package com.maezia.tdr.common.annotation;

import com.maezia.tdr.common.ModeValidator;
import com.maezia.tdr.common.enums.StatusCodeEnum;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = ModeValidator.class)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface NotNull {

    String message() default "{javax.validation.constraints.NotNull.message}";

    StatusCodeEnum type() default StatusCodeEnum.SYSTEM_ERROR;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
